<?php
/*
 * Created on 08.01.2007
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 * 
 * <example:bodyProcess></example:bodyProcess>
 */

m2import('phpinchains/psp/Tag.php');

class cms_paramHandler extends phpinchains_psp_Tag
{

    /**
     * Is a body tag (if false, body is ignored)
     */
    var $tagType = PSP_BODY_TAG;
    /**
     * Tag name in form namespace:tagname
     */
    var $tagName   = 'cms:param';

    var $requiredAttributes = array(
        'name' => '[\w_\d-]+'

    );
    var $attributes = array(
    );
    
    function doStartTag()
    {
        return PSP_EVAL_BODY_BUFFERED;
    }

    function doEndTag()
    {
        $paramvalue = $this->body->getBuffer();
        $paramname  = $this->getAttribute('name');

        $p = $this->getParent();
        $p->addParam($paramname, $paramvalue);
        return PSP_SKIP_BODY;
    }

    function parentIn()
    {
        return array('cms:includeapp', 'cms:tracingmenu');
    }

}
?>